<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<ul>
		<li>alex</li>
		<li>伊宁</li>
		<li>未来</li>
		<li>张菌康</li>
	</ul>

	<script src="jquery.js"></script>
	<script>
		

		$(function () {
			var i = 2;
			$(`ul li:eq(${i})`).css('color','red');
			$('ul li:first').css('color','red');
			$('ul li:last').css('color','red');

		})
	</script>
	
</body>
</html>